<!DOCTYPE html>
<html lang="es">
<head>
	<title>Aprendiendo jQuery Mobile</title>
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" type="text/css" href="Content/jquery.mobile-1.2.0.css" />
	<script type="text/javascript" src="jquery-1.8.3.min.js"> </script>
	<script type="text/javascript" src="Content/jquery.mobile-1.2.0.js"> </script>
</head> 
<body>

<div id="tweet"><ul style="list-style:none;"></ul></div>
<script>
$.getJSON("https://api.twitter.com/1/statuses/user_timeline/rf1souto.json?count=10&include_rts=1&callback=?", function(data) {
	for(var i=1; i<data.length; i++){
	   $("#tweet ul").append("<li>" + replaceURLWithHTMLLinks(data[i].text) + '</li>');
	}
		
	function replaceURLWithHTMLLinks(text) {
		var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig;
		return text.replace(exp,"<a href='$1'>$1</a>"); 
	}
});
</script>


</body>	
</html>